#include"sort.h"
#include"Stack.h"
void SortPrint(int *a,int n)
{

	for (int i = 0; i < n; i++)
	{
		printf("%d ", a[i]);
	}
}
void TestInsertSort()
{
	/*int a[20];
	int i = 0;
	for (i = 0; i <20; i++)
	{
		a[i] = i;
	}*/
	int a[]={ 3,2,5,6,5,5,8,1,6,7,9,9,10};
	printf("原来的数组:");
	SortPrint(a, sizeof(a) / sizeof(a[0]));
	/*printf("\n");
	InsertSort(a, sizeof(a) / sizeof(a[0]));
	printf("直接插入排序后的数组:");
	SortPrint(a, sizeof(a) / sizeof(a[0]));*/
	/*printf("\n");
	printf("希尔排序后的数组：");
	ShellSort(a, sizeof(a) / sizeof(a[0]));
	SortPrint(a, sizeof(a) / sizeof(a[0]));*/
	/*printf("\n");
	printf("选择排序后的数数组：");
	SelectSort(a, sizeof(a) / sizeof(a[0]));
	SortPrint(a, sizeof(a) / sizeof(a[0]));*/
	printf("\n");
	/*HeapSort(a, sizeof(a) / sizeof(a[0]));
	SortPrint(a, sizeof(a) / sizeof(a[0]));*/
	/*BubbleSort(a, sizeof(a) / sizeof(a[0]));
	SortPrint(a, sizeof(a) / sizeof(a[0]));*/
	/*QuickSort(a, 0, sizeof(a) / sizeof(a[0])-1);*/
	/*QuickSortNonR(a, 0, sizeof(a) / sizeof(a[0]));*/
	/*MergeSort(a, sizeof(a) / sizeof(a[0]));*/
	/*MergeSortNonR(a, sizeof(a) / sizeof(a[0]));*/
	CountSort(a, sizeof(a) / sizeof(a[0]));
	SortPrint(a, sizeof(a) / sizeof(a[0]));
}  
int main()
{
	TestInsertSort();
	/*TestOP();*/
	return 0;
}